package com.ssii.www.myproject.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name = "t_user")
@ToString
public class User extends BaseDomain {
  @Getter
  @Setter
  private String name;
  @Getter
  @Setter
  private String password;
  @Getter
  @Setter
  private Long forbidden;
  @Getter
  @Setter
  @ManyToMany
  @JoinTable(name = "t_user_role",joinColumns = @JoinColumn(name="user_id"),inverseJoinColumns = @JoinColumn(name="role_id"))
  private List<Role> roles = new ArrayList<>();

}
